{% load i18n %}
{% load domain %}
{% load doi %}

{% for record in paper.sorted_oai_records %}
<p>
    {% if record.splash_url %}
        <a href="{{ record.splash_url }}">
	{% endif %}
    {% if record.priority > 0 %}
        {{ record.source_or_publisher }}
    {% else %}
        {% if record.splash_url %}
            [{{ record.splash_url |domain }}]
        {% elif record.pdf_url %}
            [{{ record.pdf_url |domain }}]
        {% endif %}
    {% endif %}
    {% if record.splash_url %}<img src="/static/extlink.png" alt="[^]" /></a>{% if record.pdf_url %} | {% endif %}
	{% endif %}
    {% if record.pdf_url %}
    <a href="{{ record.pdf_url }}" class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-save"></span> PDF</a>
    {% endif %}
    {% if request.user.is_superuser %}
        <a href="http://doai.dissem.in/oai?verb=GetRecord&metadataPrefix=base_dc&identifier={{ record.identifier }}">Metadata</a>
    {% endif %}
</p>
{% endfor %}

